package pers.course.week5;

import java.util.Scanner;

public class BinaryForm{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        for (int i = 0; i < num; i++) {
            int number = in.nextInt();
            String str = Integer.toBinaryString(number);
            System.out.println(str);
        }
        in.close();
    }
}
